﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IR.Controller.ModelControllers;
using IR.WPF.ViewModels.LandingViewModels;

namespace IR.WPF.UI.ViewModels
{
    public class VMIdeaHeader : ViewModelBase
    {
        private VMIdea[] _ideas = new VMIdea[0];

        public VMIdea[] Ideas {
            get {
                //Make this async
                _ideas = CIdea.QueryIdeas(null)
                    .OrderBy(ci => ci.LastUpdated)
                    .Select(idea => new VMIdea(idea))
                    .ToArray();

                return _ideas;
            }
        }
    }
}
